package com.oceansoft.mobile.biz.api.entity;

import org.springframework.jdbc.core.RowMapper;

import java.sql.ResultSet;
import java.sql.SQLException;

/**
 * 部门可预约数，没有的默认数量都是20
 */

public class WxDeptResevre {
	private String deptid;//部门ID
	private int sbnum =20;//申报数
	private int zxnum =20;//注销数
	private int qynum=20;//迁移数
	private int djnum=20;//登记数
	private int issb=0;//是否申报
	private int iszx=0;//是否注销
	private int isqy=0;//是否迁移
	private int isdj=0;//是否登记

	public static RowMapper<WxDeptResevre> getRowMapper() {
		return new RowMapper<WxDeptResevre>() {
			public WxDeptResevre mapRow(ResultSet rs, int rowNum) throws SQLException {
				WxDeptResevre obj = new WxDeptResevre();
				obj.setDeptid(rs.getString("deptid"));
				obj.setSbnum(rs.getInt("sbnum"));
				obj.setZxnum(rs.getInt("zxnum"));
				obj.setQynum(rs.getInt("qynum"));
				obj.setDjnum(rs.getInt("djnum"));
				return obj;
			}
		};
	}
	public static RowMapper<WxDeptResevre> getRowMapperByOpenId() {
		return new RowMapper<WxDeptResevre>() {
			public WxDeptResevre mapRow(ResultSet rs, int rowNum) throws SQLException {
				WxDeptResevre obj = new WxDeptResevre();
				obj.setIssb(rs.getInt("issb"));
				obj.setIszx(rs.getInt("iszx"));
				obj.setIsqy(rs.getInt("isqy"));
				obj.setIsdj(rs.getInt("isdj"));
				return obj;
			}
		};
	}
	public int getIssb() {
		return issb;
	}

	public void setIssb(int issb) {
		this.issb = issb;
	}

	public int getIszx() {
		return iszx;
	}

	public void setIszx(int iszx) {
		this.iszx = iszx;
	}

	public int getIsqy() {
		return isqy;
	}

	public void setIsqy(int isqy) {
		this.isqy = isqy;
	}

	public int getIsdj() {
		return isdj;
	}

	public void setIsdj(int isdj) {
		this.isdj = isdj;
	}

	public String getDeptid() {
		return deptid;
	}

	public void setDeptid(String deptid) {
		this.deptid = deptid;
	}

	public int getSbnum() {
		return sbnum;
	}

	public void setSbnum(int sbnum) {
		this.sbnum = sbnum;
	}

	public int getZxnum() {
		return zxnum;
	}

	public void setZxnum(int zxnum) {
		this.zxnum = zxnum;
	}

	public int getQynum() {
		return qynum;
	}

	public void setQynum(int qynum) {
		this.qynum = qynum;
	}

	public int getDjnum() {
		return djnum;
	}

	public void setDjnum(int djnum) {
		this.djnum = djnum;
	}
}
